<template>
    <div style="margin: 10px;overflow: hidden">
        <div style="float: right;">
            <Page :total="data.total" :page-size="data.size" :current="data.current"
                  :page-size-opts="[10, 50, 100, 500, 1000]" @on-change="currentChange"
                  @on-page-size-change="sizeChange" show-total show-elevator show-sizer></Page>
        </div>
    </div>
</template>

<script>
    export default {
        props: ['data', 'getData'],
        methods: {
            currentChange (current) {
                this.getData(current);
            },
            sizeChange (size) {
                this.getData(1, size);
            }
        }
    };
</script>

<style>
    .ivu-page-options-elevator input {
        height: 30px !important;
    }
</style>